Installation problem :Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory

Installation problem :Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory

Clock Icon2023.03.15

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

I tried to install the python package on my pc using the pip install

Problems

I got this error:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'opt/anaconda3/lib/python3.8/site-packages/jmespath-0.10.0.dist-info/METADATA'

How I solved it

When I checked that location it didn't contain METADATA, but another folder named pip-21.3.1.dist-info That folder had several files in it including METADATA

Just move it outside into the above directory and the Problem is fixed. pip3 install --upgrade pip And I could install the python library again.

OR

Navigate to the site-packages directory and delete pip-21.3.1.dist-infofolder.

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.